import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export const constantRoutes = [
    {
        path: '/login',
        component: () => import('@/view/login/index.vue'),
        hidden: true
    },
    {
        path: '/',
        component:() => import('@/view/dashboard/index.vue'),
        redirect: '/dashboard',
        children: [
            {
                path: '/dashboard',
                component: () => import('@/view/dashboard/index.vue'),
                name: 'Dashboard',
                meta: { title: 'dashboard', icon: 'dashboard', affix: true }
            }
        ]
    }
]

const router = new VueRouter({
    routes:constantRoutes
})

export default router